package com.genersoft.iot.vmp.storager.dao;


import com.genersoft.iot.vmp.storager.dao.dto.Vedio;
import com.genersoft.iot.vmp.storager.dao.dto.isLock;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface VedioToRecord {


    @Update("update vedio_to_test set  is_need=1,is_wait=1 where deviceId='34020000001320000001' and channelId='34020000001320000001'")
    int update();


    //查询当前设备的录像功能是否阻塞
    @Select("select * from vedio_to_test where deviceId='34020000001320000001' and channelId='34020000001320000001' and is_wait=0 and is_need=0")
    Vedio isExist();


    @Select("select * from vedio_to_test where  is_wait=1 and  is_need=1 ")
    Vedio getNeededRecord();

//    @Insert("insert into vedio_to_test values(0,0,34020000001320000001,34020000001320000001)")
//    int add();


    @Update("update vedio_to_test set  is_need=0,is_wait=0 where deviceId='34020000001320000001' and channelId='34020000001320000001'")
    int change();


    @Insert("select * from vedio_is_lock")
    isLock islock();

}
